home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9845 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1012 b 

  1. Path: dolphin.upenn.edu!perkel
  2. From: perkel@dolphin.upenn.edu (Jeffrey M. Perkel)
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: [Q]: Date Algorithm
  5. Date: 4 Mar 1996 19:33:27 GMT
  6. Organization: University of Pennsylvania
  7. Message-ID: <4hfgi7$l7v@netnews.upenn.edu>
  8. NNTP-Posting-Host: dolphin.upenn.edu
  9. X-Newsreader: TIN [version 1.2 PL2-upenn1.3]
  10.  
  11. Hi, all,
  12.  
  13. I have a question.  I'm looking for an algorithm to determine the day of 
  14. the week given a specific date.  I'm sure that these are relatively well 
  15. known, but I couldn't find one in any of my books.  Could somebody please 
  16. e-mail me a simple algorithm to perform this calculation?  Thanks.
  17.  
  18. Jeff
  19. P.S.  Code would be prefered, of course, but just a description of how 
  20. it's done would also be greatly appreciated.  Thanks again!
  21.  
  22.  
  23. --
  24. Jeffrey Perkel    perkel@dolphin.upenn.edu
  25. "On silver necklaces they strung/the flowering stars; on crowns they 
  26. hung/the dragon-fire;in twisted wire/they meshed the light of moon and sun."
  27.                     - J.R.R. Tolkien, _The Hobbit_
  28.